package TaskOne;

import javax.lang.model.element.Name;
import java.awt.*;
import java.security.PublicKey;

/**
 * 猫科
 */
public class Felidae extends Animal{
    /**
     * 猫
     */
    private String Cat;
    /**
     * 老虎
     */
    private String Tiger;
    /**
     * 狮子
     */
    private String Lion;
    //构造
    public Felidae(){

    }
    public Felidae(String cat,String tiger,String lion){
        this.Cat=cat;
        this.Tiger=tiger;
        this.Lion=lion;

    }
    //调用父类
    public Felidae(int age,String color,String name){
        super(age, color, name);
    }
    public void output2(){
        System.out.println(this.Cat+Tiger+Lion+"它们都是猫科动物，他们同样有"+getName());
    }
    //访问修饰符
    public String getCat(){
        return Cat;
    }
    //修改修饰符
    public void setCat(String cat){
        this.Cat=cat;
    }
    public String getTiger(){
        return Tiger;
    }
    public void setTiger(String tiger){
        this.Tiger=tiger;
    }
    public String getLion(){
        return Lion;
    }
    public void setLion(String lion){
        this.Lion=lion;
    }
    public static void main(String[]args){
        Felidae felidae=new Felidae();
        felidae.setCat("猫");
        felidae.setTiger("老虎");
        felidae.setLion("狮子");

        felidae.setName("名字");
        felidae.output2();
    }

}
